#pragma once

#include <AST/ExprAST.hpp>

class While : public Expr {
  private:
    Expr *condition, *body;

  public:
    While(Expr *condition, Expr *body);

    virtual Value *codegen() override;

    friend class graphviz::GraphGenerator;

    virtual VisitResult accept(ASTVisitor &visitor) const override {
        return visitor.visitWhileAST(this);
    }
};